package cn.xuan.scan.dao.query.param;

import java.io.Serializable;
import java.util.Vector;

import org.hibernate.criterion.Criterion;

public class CommonQueryParam implements Serializable  {
	private String queryHql;
	private Class entityClass;
	private Vector expressions = new Vector();
	private Vector orderByDescs = new Vector();
	private Vector orderByAscs = new Vector();
	private Vector childrenFetchs = new Vector();
	private Integer begin;
	private Integer end;

	public CommonQueryParam() {
	}

	public CommonQueryParam(Class _entityClass) {
		this.setEntityClass(_entityClass);
	}

	public String getQueryHql() {
		return this.queryHql;
	}

	public void setQueryHql(String hql) {
		this.queryHql = hql;
	}

	public Vector getExpressions() {
		return this.expressions;
	}

	public void setExpressions(Vector _expressions) {
		this.expressions = _expressions;
	}

	public void addExpression(Criterion _queryExpression) {
		this.expressions.add(_queryExpression);
	}

	public Class getEntityClass() {
		return this.entityClass;
	}

	public void setEntityClass(Class entityClass) {
		this.entityClass = entityClass;
	}

	public Vector getChildrenFetchs() {
		return this.childrenFetchs;
	}

	public void setChildrenFetchs(Vector _childrenFetchs) {
		this.childrenFetchs = _childrenFetchs;
	}

	public void addChildrenFetch(String _childrenFetch) {
		this.childrenFetchs.add(_childrenFetch);
	}

	public Vector getOrderByDescs() {
		return this.orderByDescs;
	}

	public void setOrderByDescs(Vector _orderByDescs) {
		this.orderByDescs = _orderByDescs;
	}

	public void addOrderByDesc(String orderField) {
		this.orderByDescs.add(orderField);
	}

	public Vector getOrderByAscs() {
		return this.orderByAscs;
	}

	public void setOrderByAscs(Vector _orderByAscs) {
		this.orderByAscs = _orderByAscs;
	}

	public void addOrderByAsc(String orderField) {
		this.orderByAscs.add(orderField);
	}

	public Integer getBegin() {
		return this.begin;
	}

	public void setBegin(Integer _begin) {
		this.begin = _begin;
	}

	public Integer getEnd() {
		return this.end;
	}

	public void setEnd(Integer _end) {
		this.end = _end;
	}
}
